<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui"
>

<h:head>
	<title>Aggiungi Escursione</title>
</h:head>
<h:body>

<div id="spaziatura">
<full_page id="main">
			<!-- 		HEADER -->
			<div>
						<img src="../resources/Images/Banner.png" id="bannerTop"></img>
			</div>
			<!-- 		HEADER -->
			<div>
						<img src="../resources/Images/Banner_piccolo.png" id="bannerBottom_sx"></img>
			</div>

			<div>
						<img src="../resources/Images/Logo_td_big.png" id="logoTD"></img>
			</div>

			<div>
						<img src="../resources/Images/Banner_piccolo_dx.png" id="bannerBottom_dx"></img>
			</div>
			
			<div>
						<img src="../resources/Images/Bg.png" id="background"></img>
			</div>
			
			<div>
						<img src="../resources/Images/excursionsil.png" id="minilogo"></img>
			</div>
<!--TITOLO E SOTTOTITOLO-->
		<title_box>
		<title_TD>TravelDream</title_TD>
		</title_box>
		<!--FINE TITOLO E SOTTOTITOLO-->
		
		<box_login>
				<yellow_text id="topRightReg">Admin Section</yellow_text>
   		</box_login>

<full_page id="demiPageSmall_escursione">  
<!-- 	MENUBAR -->

	<p:menubar autoDisplay="false">
		
			<p:menuitem value="Crea pacchetto" url="CreaPacchetto.xhtml"/>
		
		<p:submenu label="Aggiunta Elementi">
			<p:menuitem value="Aggiungi Città" url="addCitta.xhtml"/>
			<p:menuitem value="Aggiungi Hotel" url="addHotel.xhtml"/>
			<p:menuitem value="Aggiungi Mezzo" url="addMezzo.xhtml"/>
			<p:menuitem value="Aggiungi Escursione" url="addEscursione.xhtml"/>
		</p:submenu>
		<p:submenu label="Modifica Elementi o Pacchetto">
			<p:menuitem value="Modifica Pacchetto" url="modPacchetto.xhtml"/>
			<p:menuitem value="Modifica Hotel" url="modHotel.xhtml"/>
			<p:menuitem value="Modifica Mezzo" url="modMezzo.xhtml"/>
			<p:menuitem value="Modifica Escursione" url="modEscursione.xhtml"/>
		</p:submenu>
		<p:submenu label="Cancella Elementi o Pacchetto">
			<p:menuitem value="Cancella Pacchetto" url="cancPacchetto.xhtml"/>
			<p:menuitem value="Cancella Hotel" url="cancHotel.xhtml"/>
			<p:menuitem value="Cancella Mezzo" url="cancMezzo.xhtml"/>
			<p:menuitem value="Cancella Escursione" url="cancEscursione.xhtml"/>
		</p:submenu>
			<p:menuitem value="Home Admin" url="index.xhtml"/>
	</p:menubar>
	
<!-- 	MENUBAR -->		
<h:form id ="form" onsubmit="#{RetrieveCitta.myCitta()}">
   <p:growl id="growl" showDetail="true" sticky="true" />
   <p:panel header="Aggiungi Escursione"> 
    <h:panelGrid id="PPGrid"  role="presentation" columns="3">
               
               
               <p:outputLabel value="Nome Escursione" />
               <p:inputText id="nomeEscursione"  value="#{NewE.escursione.nome}" />
               <p:message for="nomeEscursione"> </p:message>
               
               <p:outputLabel value="Città Partenza" />
				
               <p:selectOneMenu id= "cittaP" value="#{NewE.escursione.cittaP}" effect="fade">
                  <f:selectItem itemLabel="Seleziona un'opzione" itemValue="" />   
                  <f:selectItems  value="#{RetrieveCitta.cittaL}" var="CittaDTO" 
                  itemLabel="#{CittaDTO.citta}" itemValue="#{CittaDTO.citta}"/>
               </p:selectOneMenu>
               
               <p:message for="cittaP"> </p:message>
               
               <p:outputLabel value="Città Escursione" />

				
               <p:selectOneMenu id= "cittaE" value="#{NewE.escursione.cittaE}" effect="fade">
                  <f:selectItem itemLabel="Seleziona un'opzione" itemValue="" />   
                  <f:selectItems  value="#{RetrieveCitta.cittaL}" var="CittaDTO" 
                  itemLabel="#{CittaDTO.citta}" itemValue="#{CittaDTO.citta}"/>
               </p:selectOneMenu>
               
               <p:message for="cittaE"> </p:message>
               
               <p:outputLabel value="Mezzo di Trasporto" />
               <p:selectOneMenu id= "mezzo" value="#{NewE.escursione.mezzo}" effect="fade">
               	  <f:selectItem itemLabel="Seleziona un'opzione" itemValue="" />
                  <f:selectItem itemLabel="Automobile" itemValue="Automobile" /> 
                  <f:selectItem itemLabel="Barca" itemValue="Barca" />  
                  <f:selectItem itemLabel="Camminata" itemValue="Camminata" />
                  <f:selectItem itemLabel="Motocicletta" itemValue="Motocicletta" />
                  <f:selectItem itemLabel="Quad" itemValue="Quad" />
                  <f:selectItem itemLabel="Scooter" itemValue="Scooter" /> 
                  <f:selectItem itemLabel="Treno" itemValue="Treno" /> 
                  <f:selectItem itemLabel="Torpedone GT" itemValue="Torpedone GT" /> 
               </p:selectOneMenu>
               
               <p:message for="mezzo"> </p:message>   
               
               <p:outputLabel value="Costo" />
               <p:spinner id="Costo"   
                    value="#{NewE.escursione.prezzo}" stepFactor="0.50" min="0"/>
               <p:message for="Costo"> </p:message>
	</h:panelGrid>
	<br> </br>
	<button_selector id="bottomRight"><p:commandButton value="Crea!" update="growl"  action="#{NewE.newEscursione()}"/>
	    
	</button_selector>
</p:panel>
</h:form>
</full_page>

</full_page>

</div>
<h:outputStylesheet library="css" name="css_rules_plain_links.css" />
</h:body>
</html>